/*
 * Factory.h
 *
 *  Created on: 10 nov. 2011
 *  Authors: bnoleau, cbourdieu, rlecrois
 */

#ifndef FACTORY_H_
#define FACTORY_H_
#include "../Graph.h"
#include "../Node.h"
#include <stdlib.h>

class Factory {
public:
	Graph* createGraph(int n, double p);
	Graph* createGraphWithoutEdge(int n);
	Graph* createEmptyGraph();
	Graph* createEmptyTree();
	Graph* createTreeWithoutEdge(int n);
	Graph* createTree(int n, int nbMinFils, int nbMaxFils);
	Graph* createBinaryTree(int n);
	Graph* createBipartiteGraph(int n, double p);
	Graph* createMinCoverGraph(int n, int k, double p);
	static Factory* getInstance();
private:
	Factory();	
	~Factory();
	bool randEdge(double p);
	static Factory *uniqueFactory;
};

#endif /* FACTORY_H_ */
